<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .top,.page{
            /* border: 1px solid red; */
            text-align: center;
        }
        a{
            text-decoration: none;
            color: #000;
        }
    </style>
</head>
<body>
    <div id="outer">
        <div class="top">
            <img id="phone" src="imgs/b1.webp" alt="">
        </div>
        <div class="page">
            <a href="javascript:change(0)">1</a>&nbsp;&nbsp;
            <a href="javascript:change(1)">2</a>&nbsp;&nbsp;
            <a href="javascript:change(2)">3</a>&nbsp;&nbsp;
        </div>
    </div>
    <script>
        let imgs=["b1.webp","b2.webp","b3.webp"];
        let phone = document.getElementById("phone");
        
        function change(n){
            //js改变属性
            phone.src='imgs/'+imgs[n];
        }
    </script>
</body>
</html>